<div class="cat_page_left_list"> <span>Departments</span>
     <?php
if (isset($subcats) and ($subcats)) {
?>
     <ul>
          <li><b>
               <?php
    if (isset($cat_slug) and ($cat_slug)) {
        echo $cat_slug;
    }
    if (isset($parent_cat_slug) and ($parent_cat_slug)) {
        echo $parent_cat_slug;
        //$cat_slug = $parent_cat_slug; 
    } else {
        $parent_cat_slug = "";
    }
?>
               </b></li>
          <?php
    if (isset($subcats) and ($subcats)) {
        foreach ($subcats as $subcat) {
?>
          <li>
               <?php
            echo $html->link($subcat['Category']['name'], array(
                'controller' => 'products',
                'action' => 'index',
                'parent_cat_slug' => $parent_cat_slug,
                $subcat['Category']['slug']
            ));
?>
          </li>
          <?php
        }
    }
?>
     </ul>
     <?php
}
?>
     <span>Specifications</span>
     <?php
//pr($Category);
if (isset($attribute_group) and ($attribute_group)) {
    foreach ($attribute_group as $attribute_gp) {
        if (isset($attribute_gp['AttrGroup']['Attributes']) and ($attribute_gp['AttrGroup']['Attributes'])) {
            $attributes = $attribute_gp['AttrGroup']['Attributes'];
			$i=0;
            foreach ($attributes as $attribu) {
                if (isset($attribu['Attribute']['specifications']) and ($attribu['Attribute']['specifications'])) {
?>
     <ul>
          <li><b>
               <?php
                    if (isset($attribu)) {
                        echo $attribu['Attribute']['name'];
                    }
?>
               </b> </li>
          <?php
					 $x=1;
                    foreach ($attribu['Attribute']['specifications'] as $specification)
					 {
                        if (isset($specification['Specification']['value']) and ($specification['Specification']['value']))
						 {
?>
                          <li>
                              
                                    <?php
                                            if (isset($cat_slug) and ($cat_slug)) {
                                                $cat_slug = $cat_slug;
                                            } else {
                                                $cat_slug = "";
                                            }
                                            if (isset($parent_cat_slug) and ($parent_cat_slug)) {
                                                $parent_cat_slug = $parent_cat_slug;
                                            } else {
                                                $parent_cat_slug = "";
                                            }
                                            if (isset($first_cat_slug) and ($first_cat_slug)) {
                                                $first_cat_slug = $first_cat_slug;
                                            } else {
                                                $first_cat_slug = "";
                                            }
                                           
                                            $session_in = $this->Session->read(''.$specification['Specification']['value'].'');
											 //pr($session_in);
                                            if(isset($session_in) and ($session_in))
                                            {
                                                $session = '1'; 
                                                $checked = 'checked';
                                            }
                                            else
                                            {
                                                $session = 0;
                                                $checked = ""; 
                                            }
                                            echo $form->checkbox('Specification.name', array(
                                                'name' => 'specification_value',
                                                'value' => '' . str_replace(" ", "_", $specification['Specification']['value']) . '',
                                                 'checked'=>$checked,
                                                  'session'=>$session,
												  'class'=>'specific',
                                                'hiddenField' => false
                                            ));
                                            
                                            echo $specification['Specification']['value'];
                                            /* echo $html->link($specification['Specification']['value'], array(
                                            'controller' => 'products',
                                            'action' => 'index',
                                            $first_cat_slug,
                                            'category_slug'=>$cat_slug,
                                            'parent_cat_slug'=>$parent_cat_slug,
                                            'specification'=>str_replace(" ","_",$specification['Specification']['value'])  
                                            ));*/
                ?>
                             
                          </li>
          <?php
						  $x++;
						}
					 }
?>
     </ul>
     <?php
                }
           $i++; }
        }
    }
}
?>
</div>
